Optimal. Leaf size=61 \[ -\frac {b^2 p x}{3 a^2}+\frac {b p x^2}{6 a}+\frac {1}{3} x^3 \log \left (c \left (a+\frac {b}{x}\right )^p\right )+\frac {b^3 p \log (b+a x)}{3 a^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {2505, 269, 45}
\begin {gather*} \frac {b^3 p \log (a x+b)}{3 a^3}-\frac {b^2 p x}{3 a^2}+\frac {1}{3} x^3 \log \left (c \left (a+\frac {b}{x}\right )^p\right )+\frac {b p x^2}{6 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 269
Rule 2505
Rubi steps
\begin {align*} \int x^2 \log \left (c \left (a+\frac {b}{x}\right )^p\right ) \, dx &=\frac {1}{3} x^3 \log \left (c \left (a+\frac {b}{x}\right )^p\right )+\frac {1}{3} (b p) \int \frac {x}{a+\frac {b}{x}} \, dx\\ &=\frac {1}{3} x^3 \log \left (c \left (a+\frac {b}{x}\right )^p\right )+\frac {1}{3} (b p) \int \frac {x^2}{b+a x} \, dx\\ &=\frac {1}{3} x^3 \log \left (c \left (a+\frac {b}{x}\right )^p\right )+\frac {1}{3} (b p) \int \left (-\frac {b}{a^2}+\frac {x}{a}+\frac {b^2}{a^2 (b+a x)}\right ) \, dx\\ &=-\frac {b^2 p x}{3 a^2}+\frac {b p x^2}{6 a}+\frac {1}{3} x^3 \log \left (c \left (a+\frac {b}{x}\right )^p\right )+\frac {b^3 p \log (b+a x)}{3 a^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 62, normalized size = 1.02 \begin {gather*} \frac {a b p x (-2 b+a x)+2 b^3 p \log \left (a+\frac {b}{x}\right )+2 a^3 x^3 \log \left (c \left (a+\frac {b}{x}\right )^p\right )+2 b^3 p \log (x)}{6 a^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.04, size = 0, normalized size = 0.00 \[\int x^{2} \ln \left (c \left (a +\frac {b}{x}\right )^{p}\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 51, normalized size = 0.84 \begin {gather*} \frac {1}{3} \, x^{3} \log \left ({\left (a + \frac {b}{x}\right )}^{p} c\right ) + \frac {1}{6} \, b p {\left (\frac {2 \, b^{2} \log \left (a x + b\right )}{a^{3}} + \frac {a x^{2} - 2 \, b x}{a^{2}}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 64, normalized size = 1.05 \begin {gather*} \frac {2 \, a^{3} p x^{3} \log \left (\frac {a x + b}{x}\right ) + 2 \, a^{3} x^{3} \log \left (c\right ) + a^{2} b p x^{2} - 2 \, a b^{2} p x + 2 \, b^{3} p \log \left (a x + b\right )}{6 \, a^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.79, size = 73, normalized size = 1.20 \begin {gather*} \begin {cases} \frac {x^{3} \log {\left (c \left (a + \frac {b}{x}\right )^{p} \right )}}{3} + \frac {b p x^{2}}{6 a} - \frac {b^{2} p x}{3 a^{2}} + \frac {b^{3} p \log {\left (a x + b \right )}}{3 a^{3}} & \text {for}\: a \neq 0 \\\frac {p x^{3}}{9} + \frac {x^{3} \log {\left (c \left (\frac {b}{x}\right )^{p} \right )}}{3} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 210 vs.
\(2 (53) = 106\).
time = 5.18, size = 210, normalized size = 3.44 \begin {gather*} -\frac {\frac {2 \, b^{4} p \log \left (\frac {a x + b}{x}\right )}{a^{3} - \frac {3 \, {\left (a x + b\right )} a^{2}}{x} + \frac {3 \, {\left (a x + b\right )}^{2} a}{x^{2}} - \frac {{\left (a x + b\right )}^{3}}{x^{3}}} + \frac {2 \, b^{4} p \log \left (-a + \frac {a x + b}{x}\right )}{a^{3}} - \frac {2 \, b^{4} p \log \left (\frac {a x + b}{x}\right )}{a^{3}} - \frac {3 \, a^{2} b^{4} p - 2 \, a^{2} b^{4} \log \left (c\right ) - \frac {5 \, {\left (a x + b\right )} a b^{4} p}{x} + \frac {2 \, {\left (a x + b\right )}^{2} b^{4} p}{x^{2}}}{a^{5} - \frac {3 \, {\left (a x + b\right )} a^{4}}{x} + \frac {3 \, {\left (a x + b\right )}^{2} a^{3}}{x^{2}} - \frac {{\left (a x + b\right )}^{3} a^{2}}{x^{3}}}}{6 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.23, size = 53, normalized size = 0.87 \begin {gather*} \frac {x^3\,\ln \left (c\,{\left (a+\frac {b}{x}\right )}^p\right )}{3}+\frac {b^3\,p\,\ln \left (b+a\,x\right )}{3\,a^3}+\frac {b\,p\,x^2}{6\,a}-\frac {b^2\,p\,x}{3\,a^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________